#
# /*
#  *  This program is free software: you can redistribute it and/or modify
#  *  it under the terms of the GNU General Public License as published by
#  *  the Free Software Foundation, either version 3 of the License, or
#  *  (at your option) any later version.
#  *
#  *  This program is distributed in the hope that it will be useful,
#  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  *  GNU General Public License for more details.
#  *
#  *  You should have received a copy of the GNU General Public License
#  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  *
#  * SPDX-License-Identifier: GPL-3.0+
#  * License-Filename: LICENSE
#  *
#  */
#

SRC = \
	main.c \
	avl.c \
	compile.c \
	symbolstore.c \
	typestore.c \
	pinfostore.c \
	binfostore.c \
	registeralloc.c \
	cg-javascript.c \
	cg-java.c \
	cg.c \
	rewrite.c \
	utils.c \
	graph.c

all: $(SRC)
	$(CC) -g -Wall -Wextra -Wswitch-enum $(SRC) -I../sparse ../sparse/libsparse.a -o sparsegen
	echo "done"

indent:
	./Lindent *.c *.h

clean:
	rm -v -f *.o
	rm -v -f *.c~
	rm -v -f *.h~
	rm -v -f ./0output.js
	rm -v -f ./O.txt
	rm -v -f ./sparsegen
	rm -v -f ./dsmake.output
	rm -v -f ./dsmake.errors
	rm -v -f ./dsmake.warnings


# end
